import time

from ..celery_app import celery_app as celery


# celery使用方式1
@celery.task(name="add_task")
def add(x, y):
    time.sleep(5)
    return x + y


# @celery.task
# def mul(x, y):
#     time.sleep(5)
#     return x * y
#
#
# @celery.task
# def send_mail(msg):
#     print(f"Sending mail: {msg}")
#     return "Mail sent"
